package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.entity.buyer.UserCollect;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserCollectMapper extends BaseMapper<UserCollect> {

    @Select("select spu_id from user_collect where user_id = #{userId} and type = 1 limit #{begin},#{pageSize}")
    List<Long> getSpuIds(@Param("userId") Long userId, @Param("begin") int begin, @Param("pageSize") Integer pageSize);
}
